import HttpClient from 'ronds-react-ui/es/http/index';

export default class BackupApi {
  /**
   * 获取备份本地数据列表
   * @param input
   */
  static getBackupList(data: any) {
    const api = '/api/backup/GetBackupList';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 获取某企业备份记录
   * @param input
   */
  static getBackupRecord(data: any) {
    const api = '/api/backup/GetBackupRecord';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 获取某企业设备信息
   * @param input
   */
  static getBackupDevice(data: any) {
    const api = '/api/backup/GetBackupDevice';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 获取未备份企业数据列表
   * @param input
   */
  static getNotBackupList(data: any) {
    const api = '/api/backup/GetNotBackupList';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 获取备份本地数据详情
   * @param input
   */
  static getBackupInfo(data: any) {
    const api = '/api/backup/GetBackupInfo';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 获取磁盘列表
   * @param input
   */
  static getDiskList(data: any) {
    const api = '/api/backup/GetDiskList';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 开始备份
   * @param input
   */
  static onBackup(data: any) {
    const api = '/api/backup/OnBackup';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 获取树的最上层
   * @param input
   */
  static getTreeRoot(data: any) {
    const api = '/api/backup/GetTreeRoot';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 获取树的下一层
   * @param input
   */
  static getTreeChild(data: any) {
    const api = '/api/backup/GetTreeChild';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }

  /**
   * 获取波形数据
   * @param input
   */
  static getWaveList(data: any) {
    const api = '/api/backup/GetWaveList';
    return HttpClient.fetch<any>(api, { method: 'post', body: data, data });
  }
}
